<?php

include  __DIR__ . '/../vendor/autoload.php';

use IMOcean\Utils\CoroutineCoat;
use IMOcean\Closure\ClosureList;
use IMOcean\Closure\Closure as SpecialClosure;


$serverList = new ClosureList();
$serverList->push(new SpecialClosure(function () {
    echo __METHOD__ . PHP_EOL;
}));
$serverList->push(new SpecialClosure(function () {
    echo __METHOD__ . PHP_EOL;
}));
$serverList->push(new SpecialClosure(function () {
    echo __METHOD__ . PHP_EOL;
}));

$status = CoroutineCoat::executeMultipleSynchronization($serverList);

PrintCoat('Process end: ', $status);

